function rslice_step_forward ( hObject, handles )
% RSLICE_STEP_FORWARD:  moves the timestep forward one unit.
%
% Calls: 
%     rslice_hslice_redraw, rslice_vslice_redraw, 
%     rslice_velocity_vslice_redraw
% Called by:  
%     rslice

	gdata = guidata ( hObject );

	old_timestep = str2double ( get (handles.timestep_edit, 'String' ) );
	new_timestep = old_timestep + 1;



	%
	% Check to make sure that the timestep is valid.  If not, then set it 
	% to whichever extrema to which it is closest.
	if isnan ( new_timestep )

		%
		% Ok, the user did something bad.  Set the timestep back to 
		% zero.
		new_timestep = old_timestep;

	elseif ( new_timestep < 0 )
		new_timestep = 0;
		gdata.timestep = 0;
	elseif ( new_timestep >= gdata.max_num_timesteps )
		new_timestep = gdata.max_num_timesteps - 1;
		gdata.timestep = gdata.max_num_timesteps - 1;
	else
		%
		% No fractions.
		gdata.timestep = floor(new_timestep);
	end

	%
	% This only changes things if the value specified by the
	% user was not a valid discrete timestep index.
	set ( handles.timestep_edit, 'String', num2str(gdata.timestep) );

	%
	% If we are using a list of netcdf files, then check if we are to
	% advance into another file
	if strcmp ( gdata.input_type, 'directory' )
		ind = find ( (new_timestep >= gdata.ncfile_start_index) & (new_timestep <= gdata.ncfile_stop_index) );
		gdata.ncfile_index = ind;
	end


	guidata ( hObject, gdata );

	rslice_hslice_redraw;

	%
	% Is the vslice figure visible?  If so, then issue a redraw.
	vis = get ( gdata.vslice_figure, 'Visible' );
	if strcmp ( vis, 'on' )
		vslice_options.get_new_line = 0;
		vslice_options.retrieve_new_data = 1;
		rslice_vslice_redraw ( hObject, vslice_options );
	end


	%
	% Is the vslice velocity figure visible?  If so, then issue a redraw.
	vis = get ( gdata.vslice_vel_figure, 'Visible' );
	if strcmp ( vis, 'on' )
		vslice_options.get_new_line = 0;
		vslice_options.retrieve_new_data = 1;
		rslice_vslice_velocity_redraw ( hObject, vslice_options );
	end


	return
